package com.basic;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;

public class JsonPresalary extends GenericServlet  
{
	private static final long serialVersionUID = 1L;
	BasicFactory bf=BasicFactory.getInstance();
	
	
	
	
	@Override
	public void service(ServletRequest request, ServletResponse response)throws ServletException, IOException 
	{
		String qyid=request.getParameter("qyid");
		String year=request.getParameter("year");
		PresalaryForm p=bf.getPresalary(qyid, year);
		
		PrintWriter pw = response.getWriter();
		pw.println("{ \"glrs\": \""+p.getGlrs()+"\", \"glff\":  \""+p.getGlff()+"\","+
				     "\"jsrs\": \""+p.getJsrs()+"\", \"jsff\":  \""+p.getJsff()+"\","+
				     "\"xsrs\": \""+p.getXsrs()+"\", \"xsff\":  \""+p.getXsff()+"\","+
				     "\"cwrs\": \""+p.getCwrs()+"\", \"cwff\":  \""+p.getCwff()+"\","+
				     "\"qtrs\": \""+p.getQtrs()+"\", \"qtff\":  \""+p.getQtff()+"\","+
				     "\"guanlizzl\": \""+p.getGuanlizzl()+"\", \"jishuzzl\":  \""+p.getJishuzzl()+"\","+
				     "\"xiaoshouzzl\": \""+p.getXiaoshouzzl()+"\", \"caiwuzzl\":  \""+p.getCaiwuzzl()+"\","+
				     "\"qitazzl\": \""+p.getQitazzl()+"\", \"rshj\":  \""+p.getRshj()+"\","+
				     "\"ffhj\": \""+p.getFfhj()+"\"  }");

	}
	          
}
